From d4af67af97e461838def28ddf6a6409f7a4ce61f Mon Sep 17 00:00:00 2001 From: "cl349@freefall.cl.cam.ac.uk" Date: Fri, 30 Jul 2004 19:41:50 +0000 Subject: [PATCH] bitkeeper revision 1.1108.33.18 (410aa47ebwOvb3mWKrhu5YMJbZixSg) only allow IOCTL_PRIVCMD_MMAP* for privileged guests since the direct_map calls only exist in privileged guests --- linux-2.6.7-xen-sparse/drivers/xen/privcmd/privcmd.c | 3 ++- linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgalloc.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-2.6.7-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6.7-xen-sparse/drivers/xen/privcmd/privcmd.c index 3275dd015f..8abc2331fe 100644 --- a/linux-2.6.7-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6.7-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -67,7 +67,7 @@ static int privcmd_ioctl(struct inode *inode, struct file *file, } break; - +#if defined(CONFIG_XEN_PRIVILEGED_GUEST) case IOCTL_PRIVCMD_MMAP: { #define PRIVCMD_MMAP_SZ 32 @@ -179,6 +179,7 @@ static int privcmd_ioctl(struct inode *inode, struct file *file, break; } break; +#endif default: ret = -EINVAL; diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgalloc.h b/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgalloc.h index f27a7aadcf..c9cc344679 100644 --- a/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgalloc.h +++ b/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgalloc.h @@ -56,6 +56,7 @@ static inline void pte_free(struct page *pte) #define check_pgt_cache() do { } while (0) +#ifdef CONFIG_XEN_PRIVILEGED_GUEST int direct_remap_area_pages(struct mm_struct *mm, unsigned long address, unsigned long machine_addr, @@ -66,5 +67,6 @@ int __direct_remap_area_pages(struct mm_struct *mm, unsigned long address, unsigned long size, mmu_update_t *v); +#endif /* CONFIG_XEN_PRIVILEGED_GUEST */ #endif /* _I386_PGALLOC_H */ -- 2.30.2